﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
using NLBS.Framework;

namespace NLBS.Web
{
   public class ReWriteUrlFormats:UrlFormatsProvider
    {

       public override string RssUrl()
       {
         return string.Format(CultureInfo.InvariantCulture, "{0}feed.aspx", BlogInfo.Instance().BaseUrl);
       }

       public new string GetUrl(string formatString, params object[] items)
       {
           return BlogInfo.Instance().BaseUrl + string.Format(CultureInfo.InvariantCulture, formatString, items);
       }

       public new string GetUrl(string url)
       {
           return GetUrl(url, null);
       }

        public override string ArticleCategoryRssUrl(int catID)
       {
               return GetUrl("feed.aspx?catID={0}", BlogInfo.Instance().BaseUrl);
       }

        public override string CommentRssUrl()
       {
           return GetUrl("feed.aspx?q=comment");
       }

        public override string ArticleCategoryUrl(int catID)
       {
           return GetUrl("default.aspx?catID={0}", catID);
       }

        public override string ArticleSelectedUrl()
       {
           return GetUrl("default.aspx?selected=true");
       }

        public override string ArticleModeUrl(string mode)
       {
           return GetUrl("default.aspx?mode={0}", mode);
       }

        public override string ArticleDateUrl(string date)
       {
           return GetUrl("default.aspx?date={0}", date);
       }

        public override string ArticleConent(int articleID)
       {
           return GetUrl("article.aspx?id={0}", articleID);
       }

        public override string Comment()
       {
           return GetUrl("comment.aspx");
       }

       public override string GuestBook()
       {
           return GetUrl("gbook.aspx");
       }

       public override string Login()
       {
           return GetUrl("Login.aspx");
       }

       public override string ArticleAction(string act, int articleID)
       {
           return GetUrl("articleManage.aspx?act={0}&id={1}", act, articleID);
       }

       public override string CommentEditUrl(int commentID, int logID)
       {
           throw new NotImplementedException();
       }

       public override string CommentDeleteUrl(int commentID, int logID)
       {
           throw new NotImplementedException();
       }

       public override string GuestBookEditUrl(int gbookID)
       {
           throw new NotImplementedException();
       }

       public override string GuestBookDeleteUrl(int gbookID)
       {
           throw new NotImplementedException();
       }

       public override string UserList()
       {
           throw new NotImplementedException();
       }

       public override string UserDetail(int id)
       {
           throw new NotImplementedException();
       }

       public override string Visitors()
       {
           throw new NotImplementedException();
       }

       public override string Index()
       {
           throw new NotImplementedException();
       }

       public override string SelectedArticle()
       {
           throw new NotImplementedException();
       }

       public override string UserArticle(int id)
       {
           throw new NotImplementedException();
       }

       public override string UserComment(int id)
       {
           throw new NotImplementedException();
       }

       public override string[] ArticleComment(int id)
       {
           throw new NotImplementedException();
       }

       public override string[] SingleComment(int id,int commentID)
       {
           throw new NotImplementedException();
       }

       public override string TrackBack()
       {
           throw new NotImplementedException();
       }

       public override string ArticleTrackBack(int logID)
       {
           throw new NotImplementedException();
       }

       public override string TrackBackDeleteUrl(int tbID)
       {
           throw new NotImplementedException();
       }

       public override string CatComment(int id)
       {
           throw new NotImplementedException();
       }

       public override string UserDelete(int id)
       {
           throw new NotImplementedException();
       }
    }
}
